package chan.com.huishang.presenter.impl;

import chan.com.huishang.application.Allplication;
import chan.com.huishang.iviews.ISplashViews;
import chan.com.huishang.presenter.ISplashPresenter;
import chan.com.huishang.utils.AppUtils;
import chan.com.mvplib.presenter.BaseMvpPresenter;

/**
 * Created by chen on 2017/12/25.
 * 后面为ISplpresenr 的扩展方法
 */
public class SplashPresenterImpl extends BaseMvpPresenter<ISplashViews> implements ISplashPresenter {
    private final String TAG = "SplashPresenterImpl";

    @Override
    public void checkUpdate() {
        String appVerison = AppUtils.getAppVerison(Allplication.getInstance());
        //网络获取版本更新
        //对比版本进行更新
        int i = Integer.parseInt(appVerison);
        if (i > 2) {
            getMvpView().showUpdatedialog();
        } else {
            getMvpView().enterMianActivity();
        }
    }
}
